/**
 *
 */
package com.angel.mocks.daos.impl;

import java.io.Serializable;
import java.util.Collection;

import org.hibernate.criterion.Restrictions;

import com.angel.dao.generic.impl.GenericHibernateDAO;
import com.angel.mocks.dao.generic.Teacher;
import com.angel.mocks.daos.TeacherDAO;

/**
 * @author William
 *
 */
public class TeacherDAOHibernate extends
		GenericHibernateDAO<Teacher, Serializable> implements TeacherDAO {


	public Collection<Teacher> findByAge(Integer age) {
		return super.findAllByCriteria(Restrictions.eq("age", age));
	}


	public Collection<Teacher> findByName(String name) {
		return super.findAllByCriteria(Restrictions.eq("name", name));
	}

}
